home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Demos
/
A.D. Software
/
OOFILE
/
Buildable, limited OOFILE
/
samples
/
ooftst17.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-16
|
1KB
|
53 lines
// Copyright 1994 A.D. Software. All Rights Reserved
// OOFTEST17
// see also ooftst07
// this sample demonstrates searching and sorting by
// different types of fields, and how to parameterize
// calls, passing in table and field references
// Simple stream I/O is used to interact with the user.
#include "oofile.hpp"
DECLARE_CLASS(dbPeople)
dbChar LastName, Othernames;
dbLong Salary, SalaryNoDup;
dbShort SalaryShort, SalaryShortNoDup;
dbReal SalaryReal, SalaryRealNoDup;
dbDate LastVisit, LastVisitNoDup;
dbUshort ShortUnsigned;
dbUlong LongUnsigned;
dbPeople() :
dbTable("People"),
LastName(40, "Last Name"),
Othernames(80, "Other names"),
Salary("Salary"),
SalaryNoDup("Salary NoDup"),
SalaryShort("SalaryShort"),
SalaryShortNoDup("SalaryShortNoDup"),
SalaryReal("SalaryReal"),
SalaryRealNoDup("SalaryRealNoDup"),
LastVisit("LastVisit"),
LastVisitNoDup("LastVisitNoDup"),
ShortUnsigned("ShortUnsigned"),
LongUnsigned("LongUnsigned")
{};
// my own data entry procedure
void Add(const char *lname, const char *oname, const long salary, const char* visitDate);
};
#include "ooftst07.inc"
int main()
{
cout << "OOFILE Validation Suite - Test 17\n"
<< "Simple test to demonstrate comparative searches" << endl
<< "using a database identical to ooftst07 except without indices" << endl;
doTest07("ooftst17.db");
return EXIT_SUCCESS;
}